<template>
  <div class="about">
   <mt-header :title="this.$route.params.woId">
      <router-link to="/" slot="left">
        <mt-button icon="back">返回</mt-button>
      </router-link>
    </mt-header>
    <div class="aboutBody">
      
      <mt-cell title="网点名称" :value="data.netName"></mt-cell>
      <mt-cell title="产业" :value="data.cyName"></mt-cell>
      <mt-cell title="产品大类" :value="data.productTypeName"></mt-cell>
      <mt-cell class='descTitle' title="故障现象" :label="data.netCheckGzxx" ></mt-cell>
      <mt-cell class='descTitle' title="故障原因" :label="data.netCheckGzyy" ></mt-cell>
      <mt-cell class='descTitle' title="鉴定描述" :label="data.netCheckResultDesc" ></mt-cell>
      <mt-cell class='descTitle' title="呈报描述" :label="data.reportNotes" ></mt-cell>
       <mt-cell title="审核" v-show="!data.reportStatus">
          <div class = 'mybtn'>
        <mt-button type="primary" @click="changeCapCha(true)">通过</mt-button>
        <mt-button type="danger" @click="changeCapCha(false)">不通过</mt-button>
      </div>
       </mt-cell>
     
     

    </div>
    <loading v-show="showLoading"></loading>
  </div>
</template>
<script>
import loading from "@/components/loading.vue";
import date from "@/components/date.vue";
import { Toast, Indicator } from 'mint-ui';
export default {
  name: "about",
  components: {
    loading,
    date
  }, 
  data(){
    return {
      detailList:[],
      data:{
         },
      captcha:'',
      showLoading:false,
    }
  },
  methods:{
   changeCapCha(e){
      var _this = this
       Indicator.open({
        text: 'Loading...',
        spinnerType: 'fading-circle'
      });  
      this._https({
       url:'/api/externalapi/hsi/baseInfoAPI/updProcessAuditStatus',
       method:'post',
       data:{
         auditResults:e
       }
       }).then((res) => {
         Indicator.close()
        if(res.data.data.status == '0'){
        
        Toast({
          message: '审核成功',
        }); 
        
        this.$router.push({ name: "home",});
        }else{
        Toast({
          message: res.data.data.error || res.data.data.msg,
        });
        }
      }, (err) => {
         Indicator.close()
         alert(err)
      })
    },
  },
  created: function () {
    this.data = this.$route.params;
  },
  
};
</script>

<style lang="scss">
.about{
    background:#eee;
    .mint-cell-title {
      text-align: left;
    }

    .descTitle{
       margin-top:10px;
       padding-bottom:5px;
       .mint-cell-wrapper {
          background-image:none;
       }
    }
    .mybtn{
      margin-top:10px;
      background:white;
      button {
        padding:0 5px;
        height:36px;
        margin-left:10px;
      }
    }
}
</style>

